<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- CSRF Token -->
    <meta name="csrf-token" content="{{ csrf_token() }}">

    <title>{{ config('app.name', 'Laravel') }}</title>

    <!-- Scripts -->
    <script src="{{ asset('js/app.js') }}" defer></script>

    <!-- Fonts -->
    <link rel="dns-prefetch" href="https://fonts.gstatic.com">
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">

    <!-- Styles -->
    <link href="{{ asset('css/app.css') }}" rel="stylesheet">
    {{--引入hdjs--}}
    @include('admin.layouts._hdjs')
    @include('admin.layouts._message')
    @stack('css')
</head>
<body>
<div id="app">
    <nav class="navbar navbar-expand-md navbar-light navbar-laravel">
        <div class="container">
            <a class="navbar-brand" href="{{ url('/') }}">
                {{--下面这句话的意思是取config目录下的app.php文件数组中name键的值--}}
                {{ config('app.name', 'Laravel') }}
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
                    aria-controls="navbarSupportedContent" aria-expanded="false"
                    aria-label="{{ __('Toggle navigation') }}">
                <span class="navbar-toggler-icon"></span>
            </button>

            <div class="collapse navbar-collapse" id="navbarSupportedContent">
                <!-- Left Side Of Navbar -->
                <ul class="navbar-nav mr-auto">

                </ul>

                <!-- Right Side Of Navbar -->
                <ul class="navbar-nav ml-auto">
                    <!-- Authentication Links -->
                    {{--@auth 通过认证和 @guest 没有通过认证  指令用来快速认证当前用户--}}
                    @guest('admin')
                        <li class="nav-item">
                            <a class="nav-link" href="{{ route('admin.login') }}">登陆</a>
                        </li>
                    @else
                        <li class="nav-item ">
                            <a class="nav-link" href="{{ route('admin.logout') }}">退出登陆</a>
                        </li>
                    @endguest
                </ul>
            </div>
        </div>
    </nav>
</div>
<div class="container ">
    <div class="row">
        @auth('admin')
            <div class="col-4 " style="padding-left: 0" admin.blade.php>
                <div class="card">
                    <div class="card-header">
                        商城后台
                    </div>
                    <div class="list-group">
                        <a href="{{route('admin.category.index')}}" class="list-group-item list-group-item-action">
                            商城栏目管理
                        </a>
                        <a href="{{route('admin.goods.index')}}" class="list-group-item list-group-item-action">
                            商品管理
                        </a>
                        <a href="{{route('site.index')}}" target="_blank" class="list-group-item list-group-item-action">
                            商城前台首页
                        </a>
                    </div>
                </div>
            </div>
        @endauth
        <div class="col-8 " style="padding-left: 0">
            @yield('content')
        </div>
    </div>
</div>
@stack('js')
</body>
</html>
